package com.mzpai.product.service.impl;
import com.mzpai.product.model.StoreProductDetailsSupplier;
import com.mzpai.service.impl.BaseServiceImpl;
import com.mzpai.product.service.StoreProductDetailsSupplierService;
import com.mzpai.product.mapper.StoreProductDetailsSupplierMapper;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
 *
 * <b>平台商品库-商品详情信息 | Service</b><br>
 *
 * yanglijun 2021-03-25 23:30:10
 * 
 *  @version 1.0.0
 *
 */
@Service
public class StoreProductDetailsSupplierServiceImpl extends BaseServiceImpl<StoreProductDetailsSupplier> implements StoreProductDetailsSupplierService {

	Logger logger = LoggerFactory.getLogger(StoreProductDetailsSupplier.class);

	@Autowired 
	private StoreProductDetailsSupplierMapper mapper;

	@Override
	public void deleteByProductId(Integer productId) {
		Map<String,Object> map=new HashMap<String,Object>();
		map.put("productId", productId);
		mapper.deleteByProductId(map);
		
	}

	/**
	 * 同步商品详情
	 * @param productId
	 */
	@Override
	public void syncProduct(int productId) {
		mapper.syncProduct(productId);
	}
}